package com.douziit.meilianoa.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 开票信息表
 * @author ChenBiao
 * @since 2020-10-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Invoice implements Serializable {

    private static final long serialVersionUID= 1L;

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 项目id
     */
    @TableField("project_id")
    private String projectId;

    /**
     * 开票时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("invoice_time")
    private Date invoiceTime;

    /**
     * 金额
     */
    @TableField("amount")
    private double amount;

    /**
     * 发票图片url（多张以"."分割）
     */
    @TableField("img")
    private String img;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 回款日期
     */
    @TableField("payment_collection_time")
    private Date paymentCollectionTime;

    /**
     * 回款备注信息
     */
    @TableField("payment_collection_remark")
    private String paymentCollectionRemark;
}
